import request from "@/utils/request.js"

// 查考试科目
export function listByExam(data) {
	return request.Request({
		url: '/data-core/major/listByExam',
		method: 'POST',
		data
	});
}
//回显数据
export function huixian() {
	return request.Request({
		url: '/data-core/major/getAdjustReportSchoolRecently',
		method: 'POST',
	});
}
//客服二维码
export function kefu(data, flowId) {
	let str = `?type=${data}`;
	if (flowId) {
		str += `&flowId=${flowId}`
	}
	return request.Request({
		url: '/data-core/schoolWebask/findAskHuman' + str,
		method: 'GET',
	});
}

//机构客服
export function serveUser() {
	return request.Request({
		url: '/pay/extension/queryCustomerGroup',
		method: 'GET',
	});
}


//激活码优惠客服二维码
export function jihuomama() {
	return request.Request({
		url: '/pay/extension/queryCommunityGroup',
		method: 'GET',
	});
}
//调剂报告列表/stage-api
export function tiaojiliebiao(data) {
	return request.Request({
		url: '/data-core/major/getAdjustDownLoadList',
		method: 'POST',
		data
	});
}
//199价格查询
export function jiage() {
	return request.Request({
		url: '/pay/goods/queryGoodAllById/36',
		method: 'GET',
	});
}
//激活码判断
export function jihuoma(data) {
	return request.Request({
		url: '/data-core/downloadCenterPay' + data,
		method: 'GET',
	});
}
//根据省份获取大学
export function getdaxue1(data) {
	return request.Request({
		url: '/data-core/baseSchool/pageBaseSchool',
		method: 'POST',
		data
	});
}
//判断是否购买和剩余次数
export function panduan(data) {
	return request.Request({
		url: '/kwkd/payWater/isBuyAdjustReportSchool',
		method: 'POST',
		data
	});
}
//查看是否用过预估分数
export function yugu(data) {
	return request.Request({
		url: '/data-core/major/getAdjustReportSchoolRecently',
		method: 'POST',
		data
	});
}
//上传数据生成报告
export function shangchuan(data) {
	return request.Request({
		url: '/data-core/adjustment/previewForDownloadCenterUrl',
		method: 'POST',
		data
	});
}
//稍后生成数据
export function generateLater(data) {
	return request.Request({
		url: '/data-core/major/generateLater',
		method: 'POST',
		data
	});
}
//查询数目
export function shumu(data) {
	return request.Request({
		url: '/data-core/major/getSchoolSmartAdjustRecommendMajorCount',
		method: 'POST',
		data
	});
}
//支付
export function zhifu(data) {
	return request.Request({
		url: '/kwkd/pay',
		method: 'POST',
		data
	});
}
//查询学院
export function getxueyuan(data) {
	return request.Request({
		url: '/base/t-base-college/queryCollege',
		method: 'post',
		data: data
	});
}
//商品列表
export function shangpingliebiao() {
	return request.Request({
		url: '/pay/goods/queryGoodOfAdjustWisdom',
		method: 'GET',
	});
}
//商品列表
export function shangpingliebiao1() {
	return request.Request({
		url: '/pay/goods/queryGoodOfAdjustNotice',
		method: 'GET',
	});
}

//查专业
export function getzhuanye(data) {
	return request.Request({
		url: '/base/t-base-school/queryMajor',
		method: 'POST',
		data
	});
}

//查专业新
export function getzhuanye1(data) {
	return request.Request({
		url: '/base/t-base-college/queryMajor',
		method: 'POST',
		data
	});
}

//查询大学
export function getdaxue(data) {
	return request.Request({
		url: '/base/t-base-school/querySchool',
		method: 'POST',
		data
	});
}
//智慧调剂列表
export function getlist(data) {
	return request.Request({
		url: '/data-core/major/adjust',
		method: 'POST',
		data
	});
}

// 按研究方向
export function listDirection(data) {
	return request.Request({
		url: '/data-core/major/listDirection',
		method: 'POST',
		data
	});
}

// 多条件查询
export function listByConditions(data) {
	return request.Request({
		url: '/data-core/major/listByConditions',
		method: 'POST',
		data
	});
}



// 查大学
export function pageBaseSchool(data) {
	return request.Request({
		url: '/data-core/baseSchool/pageBaseSchool',
		method: 'POST',
		data
	});
}

// ======= 专业详情 ======= begin

// 查询用户中心预报名
export function getTraffic(data) {
	return request.Request({
		url: '/bkzs/t-sign-in-advance-record/InAdvanceSign',
		method: 'POST',
		data
	});
}

// 获取报录比预报名信息
export function forecastName(data) {
	return request.Request({
		url: '/bkzs/t-sign-in-advance-record/querySignIndex',
		method: 'POST',
		data
	});
}
// 获取报录比数量数据
export function forecastNum(data) {
	return request.Request({
		url: '/bkzs/t-sign-in-advance-record/querySignPersonCount',
		method: 'POST',
		data
	});
}
// 获取专业列表
export function getMajorList(data) {
	return request.Request({
		url: '/data-core/major/list',
		method: 'POST',
		data
	});
}
// 新的获取文章信息
export function newarticleDetails(data) {
	return request.Request({
		url: '/bkzs/t-article-collect/getAppArticleList',
		method: 'POST',
		data
	});
}

// 用户中心预报名
export function addTraffic(data) {
	return request.Request({
		url: '/bkzs/t-sign-in-advance-record/InAdvanceSignUp',
		method: 'POST',
		data
	});
}
// 取消用户中心预报名
export function deleteTraffic(data) {
	return request.Request({
		url: '/bkzs/t-sign-in-advance-record/cancelSign',
		method: 'POST',
		data
	});
}

//判断是否弹窗,是否付费或输入激活码了
export function bulletFrame(data) {
	let id = uni.getStorageSync('shareUserId') || uni.getStorageSync('userId') || 0;
	return request.Request({
		url: `/pay/activation/lockData/${id}`,
		method: 'GET',
	});
}
// 判断是否拥有免费查看次数（目前总共3次）
export function ApiIsFree(data) {
	return request.Request({
		url: `/pay/flow/master/isFree/${uni.getStorageSync('userId')}`,
		method: 'GET',
	});
}
// 免费观看次数-1
export function ApiAddFree(data) {
	return request.Request({
		url: '/pay/flow/master/addFree',
		method: 'POST',
		data
	});
}



// 报录比详情
// 专业详情页初试分数线新新接口
export function firstScoreRate(data) {
	return request.Request({
		url: '/data-core/dataMajorInfo/listSchoolFirstTotalScoreRate',
		method: 'POST',
		data
	});
}

//获取分数段
export function getScoreSection(data) {
	return request.Request({
		url: '/data-core/major/getScoreSection',
		method: 'POST',
		data
	});
}
// 获取专业保录比详情
export function listSchoolTypeApplyAndEnrollRate(data) {
	return request.Request({
		url: '/data-core/dataMajorInfo/listSchoolTypeApplyAndEnrollRate',
		method: 'POST',
		data: data
	});
}
// 获取专业保录比详情 -- 
export function pageSchoolAreaApplyAndEnrollRate(data) {
	return request.Request({
		url: '/data-core/dataMajorInfo/pageSchoolAreaApplyAndEnrollRate',
		method: 'POST',
		data: data
	});
}

// 查询专业学科统计
export function subjectStat(data) {
	return request.Request({
		url: '/data-core/subject/subjectStat',
		method: 'POST',
		data: data
	});
}
// 初试分数线对应旁边表格的数据
export function listSchoolFirstTotalScoreRateTableData(data) {
	return request.Request({
		url: '/data-core/dataMajorInfo/listSchoolFirstTotalScoreRateTableData',
		method: 'POST',
		data: data
	});
}
// 获取专业下pie型图表数据
export function getMajorCounts(data) {
	return request.Request({
		url: '/data-core/major/getMajorCounts',
		method: 'post',
		data: data
	});
}

export function getScoreMajorYears(data) {
	return request.Request({
		url: '/data-core/major/getMaxEnrollQuotaYears',
		method: 'POST',
		data
	});
}

export function getMaxEnrollInfoYears(data) {
	return request.Request({
		url: '/data-core/major/getMaxEnrollInfoYears',
		method: 'POST',
		data
	});
}



//获取平均报录比数据
export function getblb(data) {
	return request.Request({
		url: '/data-core/major/getMajorRate',
		method: 'POST',
		data
	});
}

//录取名单
export function pageBaseEnrollInfoEnroll(data) {
	return request.Request({
		url: '/data-core/dataMajorInfo/pageBaseEnrollInfoEnroll',
		method: 'POST',
		data
	});
}


// 获取文章详情
export function articleContent(data) {
	return request.Request({
		url: '/bkzs/t-article-collect-detail/queryArticleDetail',
		method: 'POST',
		data
	});
}

// 添加浏览记录
export function browseRecords(data) {
	return request.Request({
		url: '/bkzs/t-article-collect/insertBrowse',
		method: 'POST',
		data
	});
}
// 文章评论列表
export function getCommentList(data) {
	return request.Request({
		url: '/bkzs/t-article-collect-comment/query',
		method: 'POST',
		data
	});
}
// 文章点赞评论查询
export function getComment(data) {
	return request.Request({
		url: `/bkzs/t-article-collect-comment/queryCount?articleId=${data.articleId}/`,
		method: 'GET',
	});
}


// 文章评论
export function insertComment(data) {
	return request.Request({
		url: '/bkzs/t-article-collect-comment/insertComment',
		method: 'POST',
		data
	});
}
// 文章删除列表
export function deleteComment(data) {
	return request.Request({
		url: '/bkzs/t-article-collect-comment/deleteComment',
		method: 'POST',
		data
	});
}
// 文章点赞
export function AddarticleLike(data) {
	return request.Request({
		url: '/bkzs/t-article-collect/insertGiveUp',
		method: 'POST',
		data
	});
}

// 其他需要了解事项
// 获取研究方向和考试科目
export function getOther(data) {
	return request.Request({
		url: '/data-core/major/getDirectionWithExamSubject',
		method: 'POST',
		data
	});
}
// 获取专业下导师列表查询
export function getTeacherList(data) {
	return request.Request({
		url: '/data-core/teacher/list',
		method: 'POST',
		data
	});
}
// 获取其他注意事项
export function otherMatters(data) {
	return request.Request({
		url: '/base/t-base-reporting/queryReportingInfo',
		method: 'POST',
		data
	});
}

// 获取学校详情
export function querySchoolDtail(data) {
	return request.Request({
		url: '/base/t-base-school/querySchoolDtail',
		method: 'POST',
		data
	});
}
// 查询学校专业优势数量
export function getAdvantages(data) {
	return request.Request({
		url: '/data-core/major/getAdvantages',
		method: 'POST',
		data
	});
}

//获取年
export function getYearMajorFirst(data) {
	return request.Request({
		url: '/data-core/major/getMajorYears',
		method: 'POST',
		data
	});
}


// 用户收藏院校
export function usercoll(data) {
	return request.Request({
		url: `/bkzs/college/collect/confirm/${data.code}/${data.schoolCode}/`,
		method: 'GET'
	});
}

//取消收藏
export function usercancel(data) {
	return request.Request({
		url: `/bkzs/college/collect/cancel/${data.code}/`,
		method: 'GET'
	});
}

//查看院校收藏状态 
export function getCollectState(data) {
	return request.Request({
		url: `/bkzs/college/collect/checkCollected/${data.schoolCode}/`,
		method: 'GET'
	});
}

// 学校专业
export function majorDistributionList(data) {
	return request.Request({
		url: `/data-core/major/majorDistributionList`,
		method: 'POST',
		data
	});
}

//获取学院表列表
export function colleageData(data) {
	return request.Request({
		url: '/data-core/colleage/list',
		method: 'POST',
		data
	});
}

// 获取专业星级、学习层次、学校类型
export function selectList(data) {
	return request.Request({
		url: `/usercenter/dict/data/list?dictType=${data}`,
		method: 'get',
	});
}

//  获取省份
export function getCityList() {
	return request.Request({
		url: '/base/t-com-gov-info/provinceList',
		method: 'GET',
	});
}

// 查询学科下拉
export function getSubjectSelect(data) {
	return request.Request({
		url: '/data-core/major/getSubjectSelect',
		method: 'post',
		data: data
	})
}


// 加入对比
export function addSchoolToCompare(data) {
	return request.Request({
		url: '/data-core/contrast/contrastSchool',
		method: 'POST',
		data
	});
}

//加入对比库
export function addDetail(data) {
	return request.Request({
		url: '/data-core/contrast/addItem',
		method: 'POST',
		data
	});
}



// 对比库左侧列表
export function getContrastList(data) {
	return request.Request({
		url: '/data-core/contrast/list',
		method: 'POST',
		data: data
	});
}
// 对比库根据左侧列表显示所收藏的学校
export function getContrastSchool(data) {
	return request.Request({
		url: '/data-core/contrast/listDetailAll/' + data.id,
		method: 'GET',
	});
}


export function listCover(data) {
	return request.Request({
		url: '/data-core/contrast/listCover/' + data.id,
		method: 'GET',
	});
}



// 对比库-备选库
export function getContrastLib(data) {
	return request.Request({
		url: '/data-core/contrast/listMyContrast',
		method: 'POST',
		data
	});
}
// 对比库-对比详情
export function getContrastDetail(data) {
	return request.Request({
		url: '/data-core/contrast/alternative',
		method: 'POST',
		data
	});
}
// 对比库-对比删除
export function contrastDetailDel(id) {
	return request.Request({
		url: '/data-core/contrast/delDetail/' + id,
		method: 'POST',
	});
}


// 热门学校
export function hotSchool(data) {
	return request.Request({
		url: '/data-core/hot/hotSchool',
		method: 'GET',
		// data
	});
}
// 热门专业-考试科目-研究方向
export function hotMajor(data) {
	return request.Request({
		url: `/data-core/hot/hotMajor?type=${data.type}`,
		method: 'GET'
	});
}


// 热门大学报录比
export function getSchoolRate(data) {
	return request.Request({
		url: '/data-core/major/getSchoolRate',
		method: 'POST',
		data
	});
}
// 热门专业报录比
export function getRateByMajor(data) {
	return request.Request({
		url: `/data-core/major/getRateByMajor`,
		method: 'POST',
		data
	});
}
// 学校详情-就业形势
export function getJobData(data) {
	return request.Request({
		url: `/data-core/school/signingRegions/` + data.title,
		method: 'GET',
	});
}
// 修改库名
export function editLibraryName(data) {
	return request.Request({
		url: `/data-core/contrast`,
		method: 'PUT',
		data
	});
}
// 删除备选库的数据
export function delLibrary(data) {
	return request.Request({
		url: `/data-core/contrast/deleteMyContrast`,
		method: 'DELETE',
		data
	});
}


// 学校详情--学院设置
export function getCollegeBySchoolCode(data) {
	return request.Request({
		url: `/data-core/dataSchoolInfo/getCollegeBySchoolCode?schoolCode=${data.schoolCode}`,
		method: 'get',
	});
}

// 获取专业图表
export function groupBySubject(data) {
	return request.Request({
		url: '/data-core/major/groupBySubject',
		method: 'post',
		data: data
	})
}


// 调剂来源
export function getAdjustSource(data) {
	return request.Request({
		url: '/data-core/major/getAdjustSource',
		method: 'post',
		data: data
	})
}
// 调剂去向
export function getAdjustGo(data) {
	return request.Request({
		url: '/data-core/major/getAdjustGo',
		method: 'post',
		data: data
	})
}

// 动态估分
export function guess(data) {
	return request.Request({
		url: '/data-core/major/listByConditions/guess',
		method: 'post',
		data: data
	})
}

// 获取学校
export function getSchoolList(data) {
	return request.Request({
		url: '/kwkd/education/likeSchoolName',
		method: 'GET',
		data: data
	})
}

// 获取专业
export function getCollegeList(data) {
	return request.Request({
		url: '/kwkd/education/findTitle1',
		method: 'GET',
		data: data
	})
}

// 获取择校报告
export function getChooseSchool(data) {
	return request.Request({
		url: '/kwkd/education/findMajorName',
		method: 'GET',
		data: data
	})
}

// 获取订单号
export function getChooseSchoolCode(data) {
	const data1 = data.schoolName + data.collegeName + data.majorName
	console.log(data1)
	return request.Request({
		url: '/kwkd/chooseSchool/checkPay?schoolName=' + data1,
		method: 'GET',
	})
}

// // 查询是否有择校报告
// export function isChooseSchool(data) {
// 	const data1=data.schoolName+data.collegeName+data.majorName
// 	console.log(data1)
//     return request.Request({
//        url: '/kwkd/education/findUrl?schoolName='+data1,
// 				// url:'/kwkd/education/findUrl'+data.schoolName+data.collegeName+data.majorName,
//         method: 'GET',
//     })
// }

// 获取城市
export function getCtiyList() {
	return request.Request({
		url: '/base/t-com-gov-info/getProvinceAndCity',
		method: 'get'
	})
}

// 发送城市获取手机号
export function postCtiyList(data) {
	return request.Request({
		url: '/bkzs/t-advertise-institution-area-relation/getAreaCustomerStaff',
		method: 'post',
		data: data
	})
}

// 提交下载择校报告
export function getPDFList(data) {
	return request.Request({
		url: '/kwkd/education/downLoadPdf',
		method: 'post',
		data: data
	})
}

// 获取下载择校报告
export function getchoosePDF(data) {
	return request.Request({
		url: '/kwkd/education/chooseList',
		method: 'post',
		data: data
	})
}


// 调剂信息最新列表
export function getAdjustDetailNew(data) {
	return request.Request({
		url: '/data-core/major/getAdjustDetailNew',
		method: 'post',
		data: data
	})
}
// 是否购买过调剂VIP
export function isBuyAdjustVip(data) {
	return request.Request({
		url: '/kwkd/payWater/isBuyAdjustVip',
		method: 'post',
		data: data
	})
}
// 解锁最新信息-商品列表
export function queryGoodOfAdjustNotice(data) {
	return request.Request({
		url: '/pay/goods/queryGoodOfAdjustNotice',
		method: 'get'
	})
}

// 调剂最新消息-立即解锁 查询商品信息
export function queryGoodAllById(data) {
	return request.Request({
		url: '/pay/goods/queryGoodAllById/' + data.id,
		method: 'get'
	})
}

// 最新调剂信息模糊查询
export function fuzzyQueryMajor(data) {
	return request.Request({
		url: '/data-core/major/fuzzyQueryMajor',
		method: 'post',
		data: data
	})
}



// 总数汇总
export function getSchoolSmartAdjustRecommendMajorCount(data) {
	return request.Request({
		url: '/data-core/major/getSchoolSmartAdjustRecommendMajorCount',
		method: 'post',
		data: data
	})
}

// 下载中心的报告列表
export function getReportSchoolRecently(data) {
	return request.Request({
		url: '/data-core/major/getReportSchoolRecently',
		method: 'get'
	})
}

// 下载中心列表  新
export function downloadCenterList(data) {
	return request.Request({
		url: '/kwkd/payWater/downloadCenterList',
		method: 'post',
		data
	})
}

// 支付调剂报告前的支付判断  新
export function isBuyAdjustReportSchool(data) {
	return request.Request({
		url: '/kwkd/payWater/isBuyAdjustReportSchool',
		method: 'get',
		data
	})
}

// 择校报告3个商品接口
export function queryGoodOfChooseSchool(data) {
	return request.Request({
		url: '/pay/goods/queryGoodOfChooseSchool',
		method: 'get',
		data
	})
}


export function regulateList(data) {
	return request.Request({
		url: '/data-core/major/getSchoolSmartAdjustAnalysisResult',
		method: 'post',
		data
	});
}

//复试参考书、学制、学费、奖学金接口
export function getSchoolPriceInfo(data) {
	return request.Request({
		url: '/data-core/major/getSchoolPriceInfo',
		method: 'post',
		data
	});
}

//同分去向
export function sameScoreGo(data) {
	return request.Request({
		url: '/data-core/major/sameScoreGo',
		method: 'post',
		data
	});
}

//同分去向地图
export function sameScoreGoMap(data) {
	return request.Request({
		url: '/data-core/major/sameScoreGoMap',
		method: 'post',
		data
	});
}

//检测是否有择校报告购买情况
export function isBuyChooseReportSchool() {
	return request.Request({
		url: '/kwkd/payWater/isBuyChooseReportSchool',
		method: 'get',
	});
}

//VIP解锁海报
export function queryAllUrl() {
	return request.Request({
		url: '/data-core/unlock/queryAllUrl',
		method: 'post',
	});
}

//复试名单&录取名单
export function pageBaseEnrollInfoEnrollDataByCode(data) {
	return request.Request({
		url: '/data-core/dataMajorInfo/pageBaseEnrollInfoEnrollDataByCode',
		method: 'post',
		data
	});
}


//调剂详情页 近四年平均复录比
export function getRetestEnrollRate(data) {
	return request.Request({
		url: '/data-core/major/getRetestEnrollRate',
		method: 'post',
		data
	});
}